<template>
  <!-- 左侧导航区域 -->
  <div class="navbar">
    <el-menu
      router
      :default-active="$route.path"
      class="el-menu-vertical-demo"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b">
      <el-menu-item v-for="item in menu" :index="item.path" :key='item.path'>
        <i :class="item.icon"></i>
        <span slot="title">{{item.title}}</span>
      </el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  data(){
    return {
      menu:[
        {
          title:'首页',
          path:'/home/',
          icon:'el-icon-s-home'
        },
        {
          title:'会员管理',
          path:'/member/',
          icon:'el-icon-s-custom',
        },
        {
          title:'供应商管理',
          path:'/supplier/',
          icon:'el-icon-s-shop',
        },
        {
          title:'商品管理',
          path:'/goods/',
          icon:'el-icon-s-goods'
        },
        {
          title:'订单管理',
          path:'/order/',
          icon:'el-icon-s-order'
        },
        {
          title:'员工管理',
          path:'/staff/',
          icon:'el-icon-user-solid'
        }
      ]
    }
  }
}
</script>

<style>
  .el-menu{
    border-right: none!important;
  }
</style>